package com.jsyl.lwbk.business.mapper.education;

import com.jsyl.lwbk.business.domain.education.ChildTrainingProgram;
import com.jsyl.lwbk.business.domain.education.ChildTrainingProgramExample;
import com.jsyl.lwbk.business.dto.EvaluateInfoDTO;
import com.jsyl.lwbk.business.dto.education.ChildTrainingProgramDTO;
import com.jsyl.lwbk.business.vo.education.TrainingScoreCountVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ChildTrainingProgramMapper {
    long countByExample(ChildTrainingProgramExample example);

    int deleteByExample(ChildTrainingProgramExample example);

    int insert(ChildTrainingProgram record);

    int insertSelective(ChildTrainingProgram record);

    /**
     * 获取小孩已稳定项目
     * @param childId
     * @return
     */
    int selectStableCount(@Param("childId")Long childId,@Param("questionId")Long questionId);

    List<ChildTrainingProgram> selectQuestion(ChildTrainingProgramDTO childTrainingProgramDTO);

    List<String> selectPreviewProgram(@Param("trainingProgramNumber")String trainingProgramNumber,
                                                    @Param("dayCount")Integer dayCount);

    int updateTrainingProgramNumber(@Param("evaluateNumbers")List<String> evaluateNumbers,
                                    @Param("trainingProgramNumber")String trainingProgramNumber);

    List<TrainingScoreCountVO> selectTrainingScoreCount(ChildTrainingProgramDTO childTrainingProgramDTO);

    List<ChildTrainingProgram> selectByExample(ChildTrainingProgramExample example);

    List<ChildTrainingProgram> listReplaceTrainingProgram(@Param("programId") Long programId,@Param("trainingContent") String trainingContent);

    int updateByExampleSelective(@Param("record") ChildTrainingProgram record, @Param("example") ChildTrainingProgramExample example);

    int updateAllUnSelected( @Param("example") ChildTrainingProgramExample example);

    int updateStstus(@Param("id") Long id,@Param("status")Integer status);

    int updateByExample(@Param("record") ChildTrainingProgram record, @Param("example") ChildTrainingProgramExample example);

    String getConfirmDate(@Param("childId")Long childId,@Param("projectType")Integer projectType,@Param("trainingProgramNumber") String trainingProgramNumber);

    EvaluateInfoDTO getEvaluateInfo(@Param("childId")Long childId,
                                    @Param("projectType")Integer projectType,
                                    @Param("trainingProgramNumber") String trainingProgramNumber);

    void updateConfirmDate(@Param("childId")Long childId,
                           @Param("projectType")Integer projectType,
                           @Param("trainingProgramNumber") String trainingProgramNumber,
                           @Param("confirmDate") String confirmDate,
                           @Param("loginName") String loginName);

    int countNewProgram(@Param("childId")Long childId,
                        @Param("trainingProgramNumber") String trainingProgramNumber,
                        @Param("projectType")Integer projectType);

    void deleteNewProgram(@Param("childId")Long childId,
                          @Param("trainingProgramNumber") String trainingProgramNumber,
                          @Param("projectType")Integer projectType);
}